﻿using Sundry.App_Start.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Sundry.Areas.Admin.Controllers
{
    [Sundry.App_Start.AdminLoginAuthor]
    public class SundrySetController : BasePromptController
    {
        //
        // GET: /Admin/SundrySet/

        public ActionResult UploadSet()
        {
            Sundry.Model.UploadSet model = Sundry.App_Start.Common.SetHelper.GetUploadSet();
            return View(model);
        }
        [HttpPost]
        public ActionResult UploadSet(Sundry.Model.UploadSet model)
        {
            if (Sundry.App_Start.Common.SetHelper.SaveUploadSet(model))
            {
                PubliFunction.InsertOperation(2, "修改上传配置", "修改上传配置文件成功！");
                return PromptView("/Admin/SundrySet/UploadSet", "修改上传配置成功");
            }
            else
            {
                PubliFunction.InsertOperation(2, "修改上传配置", "修改上传配置文件失败！");
                return PromptView("/Admin/SundrySet/UploadSet", "修改上传配置失败");
            }
        }
    }
}
